#include "LED.h"

#include "uart.h"


void LED_Init(void)
{
	rcu_periph_clock_enable(RCU_GPIOA);
	gpio_init(GPIOA, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_8);
}

void LED_Task(void)
{
	static __IO u32 timingdelaylocal = 0U;
	
	if(timingdelaylocal)
	{
		if(timingdelaylocal<500U)
		{
			gpio_bit_write(GPIOA, GPIO_PIN_8, SET);
		}
		else
		{
			gpio_bit_write(GPIOA, GPIO_PIN_8, RESET);

		}
		timingdelaylocal--;
	}else
	{
		timingdelaylocal = 1000U;
		//printf("LED Task Running!!\r\n");
	}
	
}

